package com.example.controller;

import com.example.pojo.*;
import com.example.service.ClazzService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/clazzs")
public class ClazzController {
    private static final Logger log = LoggerFactory.getLogger(EmpController.class);
    @Autowired
    private ClazzService clazzService;
    //条件分页查询班级信息
    @GetMapping
    public Result page(ClazzQueryParam clazzQueryParam){
        log.info("查询班级信息,{}",clazzQueryParam);
        PageResult<Clazz> pageResult = clazzService.page(clazzQueryParam);
        return Result.success(pageResult);
    }
}
